#include<bits/stdc++.h>
using namespace std;
const int N=1e6+5,P=23333,mod1=1e9+7,mod2=147744151;
int n,k,cnt,t[26];
long long A,B;
char s[N];
struct node{
	int h1,h2,c;
	inline bool operator==(node y){return h1==y.h1&&h2==y.h2;}
	inline bool operator<(node y){return h1==y.h1?h2<y.h2:h1<y.h1;}
}a[N];
map<pair<int,int>,int> dis,mp;
vector<char> C;
string S;
int main(){
	freopen("string.in","r",stdin);
	freopen("string.out","w",stdout);
	scanf("%d%d%lld%lld",&n,&k,&A,&B);
	scanf("%s",s+1);
	int h1=0,h2=0,w1=1,w2=1;
	for(int i=1;i<k;++i) w1=1ll*w1*P%mod1,w2=1ll*w2*P%mod2,h1=(1ll*h1*P+s[i])%mod1,h2=(1ll*h2*P+s[i])%mod2;
	for(int i=k;i<=n;++i){
		h1=(1ll*(h1-1ll*w1*s[i-k]%mod1)*P%mod1+mod1+s[i])%mod1;
		h2=(1ll*(h2-1ll*w2*s[i-k]%mod2)*P%mod2+mod2+s[i])%mod2;
		a[i]={h1,h2,s[i+1]-'a'};
	}
	sort(a+k+1,a+n);
	for(int i=k;i<n;){
		memset(t,0,sizeof(t));
		int j=i;
		while(j<n&&a[j]==a[i]) ++t[a[j++].c];
		int cn=-1,ch;
		for(int k=0;k<26;++k) if(t[k]>cn) ch=k,cn=t[k];
		mp[{a[i].h1,a[i].h2}]=ch;
		i=j;
	}
	for(int i=n-k+1;i<=n;++i) S+=s[i];
	A-=n+1,B-=n+1;
	int po=0,l=0;
	for(int i=0;i<=B;++i){
		if(dis.count({h1,h2})){
			po=dis[{h1,h2}];
			break;
		}
		int ch;
		if(mp.count({h1,h2})) ch=mp[{h1,h2}]+'a';
		else ch='a';
		C.push_back(ch);
		dis[{h1,h2}]=(int)C.size()-1;
		h1=((1ll*h1-1ll*S[l]*w1%mod1+mod1)*P%mod1+ch)%mod1;
		h2=((1ll*h2-1ll*S[l]*w2%mod2+mod2)*P%mod2+ch)%mod2;
		++l,S+=ch;
	}
	long long fir;
	if(A<C.size()) fir=A;
	else fir=(A-po)%((long long)C.size()-po)+po;
	for(long long i=fir,len=B-A+1;len--;i=(i==C.size()-1?po:i+1)) putchar(C[i]);
	return 0;
}


